package com.mode.mediator.pattern;

/**
 * @Description: 用一个中介对象封装一系列的对象交互，中介者使各对象不需要显示的相互作用，
 * 从而使其耦合松散，而且可以单利的改变他们之间的交互
 * @Author: zyf
 * @Time: 2020/9/27 15:40
 */
public class MediatorMain {

    public static void main(String[] args) {
        ConcreteMediator concreteMediator = new ConcreteMediator();

        Man xiaoming = new Man("xiaoming", 1, concreteMediator);

        Women xiaohong = new Women("xiaohong", 1, concreteMediator);

        xiaoming.getCompation(xiaohong);


    }
}
